<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>ftime</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_005_347">&nbsp;</a>NAME</h4><blockquote>
ftime - get date and time
</blockquote><h4><a name = "tag_000_005_348">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="systimeb.h.html">sys/timeb.h</a>&gt;

int ftime(struct timeb *<i>tp</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_005_349">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>ftime()</i>
function sets the
<b>time</b>
and
<b>millitm</b>
members of the
<b>timeb</b>
structure pointed to by
<i>tp</i>
to contain the seconds and milliseconds portions, respectively, of
the current time in seconds since 00:00:00 UTC
(Coordinated Universal Time), January 1, 1970.
The contents of the
<b>timezone</b>
and
<b>dstflag</b>
members of
<i>tp</i>
after a call to
<i>ftime()</i>
are unspecified.
<p>
The system clock need not have millisecond granularity.  Depending on 
any granularity (particularly a granularity of one) renders code 
non-portable.
</blockquote><h4><a name = "tag_000_005_350">&nbsp;</a>RETURN VALUE</h4><blockquote>
Upon successful completion, the
<i>ftime()</i>
function returns 0.  Otherwise -1 is returned.
</blockquote><h4><a name = "tag_000_005_351">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_000_005_352">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_005_353">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
For portability to implementations conforming to earlier versions of this
specification,
<i><a href="time.html">time()</a></i>
is preferred over this function.
</blockquote><h4><a name = "tag_000_005_354">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_005_355">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="ctime.html">ctime()</a></i>,
<i><a href="gettimeofday.html">gettimeofday()</a></i>,
<i><a href="time.html">time()</a></i>,
<i><a href="systimeb.h.html">&lt;sys/timeb.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
